using System;
using System.Runtime.CompilerServices;

namespace Triton.Common
{
	public class WaitTimer
	{
		[CompilerGenerated]
		private TimeSpan timeSpan_0;

		[CompilerGenerated]
		private DateTime dateTime_0;

		public TimeSpan Time
		{
			[CompilerGenerated]
			get
			{
				return timeSpan_0;
			}
			[CompilerGenerated]
			set
			{
				timeSpan_0 = value;
			}
		}

		public DateTime Started
		{
			[CompilerGenerated]
			get
			{
				return dateTime_0;
			}
			[CompilerGenerated]
			private set
			{
				dateTime_0 = value;
			}
		}

		public bool Finished => Started.Add(Time) < DateTime.Now;

		public WaitTimer(TimeSpan timePeriod)
		{
			Time = timePeriod;
			Restart();
		}

		public void Restart()
		{
			Started = DateTime.Now;
		}

		public void Restart(TimeSpan time)
		{
			Time = time;
			Started = DateTime.Now;
		}
	}
}
